finding common patterns